#import <Foundation/Foundation.h>

@interface NSString (ARLStringUtils)
//Category
- (NSString*)arl_encodeBase64; // base64Encode
- (NSString*)arl_decodeBase64; // base64Decode
@end

@interface ARLStringUtils : NSObject
// base64Encode 入参NSString 出参NSString
+(NSString*)base64StringFromString:(NSString*)originStr;
+(NSString*)base64webSafeStringFromString:(NSString*)originStr;
// base64Decode 入参NSString 出参NSString
+(NSString*)decodeFromBase64String:(NSString*)originStr;
+(NSString*)decodeFromBase64WebSafeString:(NSString*)base64EncodedStr;

//NSString转换成NSData
+(NSData*)dataFromString:(NSString*)originStr;
//NSData转换成NSSttring
+(NSString*)stringFromData:(NSData*)data;

//NSString转换成NSDictionary
+(NSDictionary*)dictionaryFromJSONString:(NSString*)jsonStr;
//NSString转换成NSArray
+(NSArray*)arrayFromJSONString:(NSString*)jsonStr;

+(id)objectFromJSONString:(NSString*)jsonStr;
+(NSString*)stringFromDictionary:(NSDictionary*)dict;
+(NSString*)stringFromArray:(NSArray*)array;

//url编码解码
+(NSString*)encodeUrl:(NSString*)url;
+(NSString*)decodeUrl:(NSString*)encodedUrl;
+ (NSString *)encodeURIComponent:(NSString*)url;

+(BOOL)isEmpty:(NSString*)str;
+(BOOL)isNotEmpty:(NSString*)str;
+(NSString*)formatSpaceWithUnderline:(NSString*)fmtStr;


+(int)hashCode:(NSString*)targetStr;

+ (NSString *)dataToHexString:(NSData *)data;

+ (NSString *)trimString:(NSString*)str;
@end
